package com.shujia.spark2

import org.apache.spark.{SparkConf, SparkContext}

object Demo1WordCount {
  def main(args: Array[String]): Unit = {

    val conf = new SparkConf().setAppName("app").setMaster("local")

    val sc = new SparkContext(conf)
    val rdd = sc.textFile("")

    rdd.flatMap(_.split(".")).map((_, 1)).reduceByKey(_ + _).foreach(println)
  }

}
